{pkgs, ...}: {
  # cpu
  boot = {
    initrd = {
      kernelModules = ["kvm-intel"];
    };
    kernelParams = ["i915.fastboot=1" "enable_gvt=1"];
  };
  environment.systemPackages = with pkgs; [
    # intel
    intel-gpu-tools
    #nvidia
    vulkan-tools
    vulkan-loader
    vulkan-validation-layers
    libva
    libva-utils
  ];

  # gpu
  services.xserver = {
    videoDrivers = ["nvidia"];
    monitorSection = ''
      Option "DPMS" "false"
    '';
    serverFlagsSection = ''
      Option "StandbyTime" "0"
      Option "SuspendTime" "0"
      Option "OffTime" "0"
      Option "BlankTime" "0"
    '';
  };
  boot = {
    # blacklist nouveau module so that it does not conflict with nvidia drm stuff
    # also the nouveau performance is godawful, I'd rather run linux on a piece of paper than use nouveau
    blacklistedKernelModules = ["nouveau"];
  };

  hardware = {
    nvidia = {
      modesetting.enable = true;
      powerManagement = {
        enable = true;
      };

      # use open source drivers by default, hosts may override this option if their gpu is
      # not supported by the open source drivers
      open = true;
    };

    opengl = {
      enable = true;
      driSupport = true;
      driSupport32Bit = true;
      extraPackages = with pkgs; [
        vaapiVdpau
        libvdpau-va-gl
        nvidia-vaapi-driver
      ];
      extraPackages32 = with pkgs.pkgsi686Linux; [nvidia-vaapi-driver];
    };
  };
  environment = {
    variables = {
      GBM_BACKEND = "nvidia-drm";
      LIBVA_DRIVER_NAME = "nvidia";
      __GLX_VENDOR_LIBRARY_NAME = "nvidia";
    };
    # AMD_VULKAN_ICD = "RADV";
  };
}
